let { db } = require('../tools');

module.exports = (req, res) => {
    // console.log(req.query);
    let { id } =  req.query;
    id = id - 1 
    db.collection('order')
        .findMany(null, data => data.skip(7 * id).limit(7))
            .then(data => {
                res.json({errno: 0 , data})
            })
            .catch(err => res.json(err))
}